<template>
  <el-main>
    <el-menu
        :router="true"
        :default-active="this.$route.path"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b">
      <el-menu-item index="/login">登录</el-menu-item>
      <el-menu-item index="/list">套餐</el-menu-item>
      <el-submenu index="/group/list">
        <template slot="title">检查组</template>
        <el-menu-item index="/group/list">查看所有检查组</el-menu-item>
        <el-menu-item index="">新增检查组</el-menu-item>
      </el-submenu>
      <el-menu-item index="/item/list">检查项</el-menu-item>
      <el-menu-item index="/es">es</el-menu-item>
    </el-menu>
    <router-view></router-view>
  </el-main>
</template>

<script>
import { v4 as uuidv4 } from 'uuid'
export default {
  name: "Navigation",
  methods:{
    handleSelect(key, keyPath) {
      console.log(keyPath)
    }
  },
  created() {
    console.log(uuidv4())
  }
}
</script>

<style scoped>

</style>